package UI;

import DAL.DepositSetting;
import DAL.LogQuery;
import Entity.PenaltyBill;

import java.util.List;
import java.util.Scanner;

/**
 * @Author Chen
 * @Date 2022/1/6 17:20
 * @Version 1.0
 * 管理员操作界面
 */
public class ManagerUI {
    public static void ui() throws Exception {
        Scanner sc=new Scanner(System.in);
        boolean option=true;
        while (option){
            System.out.println("************图书管理系统***********");
            System.out.println("1.查看员工工作日志");
            System.out.println("2.员工信息管理");
            System.out.println("3.图书逾期罚金账单查询");
            System.out.println("4.退出");
            System.out.println("请选择：");
            String number=sc.next();
            switch (number){
                case "1":
                    LogQuery.appoint();
                    break;
                case "2":EmployeeInformationUI.ui();break;
                case "3":
                    DepositSetting ds=new DepositSetting();
                    List<PenaltyBill> penaltyBills = ds.selectFile();
                    System.out.println("图书编号   读者编号   罚金");
                    penaltyBills.forEach(System.out::println);
                    break;
                case "4":option=false;break;
                default:
                    System.out.println("没有"+number+"这个选项！");break;
            }
        }
    }
  }
